#ifndef __MUSIC_LIST_H__
#define __MUSIC_LIST_H__

#include "STC8G_H_Delay.h"

#define	L1	1
#define	L2	2
#define	L3	3
#define	L4	4
#define	L5	5
#define	L6	6
#define	L7	7

#define N0 0

#define	N1	L1 + 7
#define	N2	L2 + 7
#define	N3	L3 + 7
#define	N4	L4 + 7
#define	N5	L5 + 7
#define	N6	L6 + 7
#define	N7	L7 + 7

#define	H1	N1 + 7
#define	H2	N2 + 7
#define	H3	N3 + 7
#define	H4	N4 + 7
#define	H5	N5 + 7
#define	H6	N6 + 7
#define	H7	N7 + 7

u8 code music_note[] = {
    N6, N7, 			 H1, N7, H1, H3, 	  N7, N3, N3, 			N6, N5, N6, H1, 		 N5, N0, N3, N3,		N4, N3, N4, H1,
    N3, N0, H1, H1, H1,  N7, N4, N4, N7,	  N7, N0, N6, N7, 		H1, N7, H1, H3,			 N7, N0, N3, N3,		N6, N5, N6, H1,
    N5, N0, N3, 		 N4, H1, N7, N7, H1,  H2, H2, H3, H1, N0,   H1, N7, N6, N6, N7, N5,	 N6, N0, H1, H2,		H3, H2, H3, H5,
    H2, N0, N5,	N5,		 H1, N7, H1, H3,	  H3, N0, N0,			N6, N7, H1, N7, H2, H2,  H1, N5, N5, N0,		H4, H3, H2, H1,
    H3, 		 		 H3, N0, H3,		  H6, H5, H5,			H3, H2, H1, N0, H1, 	 H2, H1, H2, H2, H5, 	H3, N0, H3,
    H6,	H5,				 H3, H2, H1, N0, H1,  H2, H1, H2, H2, N7,   N6, N0, 
};

u8 code durations[] = {
    2, 2, 				6, 2, 4, 4, 		  12, 2, 2, 			6, 2, 4, 4, 			8, 4, 2, 2,				6, 2, 2, 6,
    8, 2, 2, 2, 2, 	    6, 2, 4, 4,			  8, 4, 2, 2, 			6, 2, 4, 4,				8, 4, 2, 2,				6, 2, 4, 4,
    12, 2, 2, 			4, 2, 2, 4, 4,		  2, 2, 2, 4, 4, 		4, 2, 2, 2, 4, 4,		8, 4, 2, 2,				6, 2, 4, 4,
    8, 4, 2, 2,			2, 2, 4, 4,			  8, 4, 4,				2, 2, 4, 4, 2, 2, 		6, 2, 4, 4,				4, 4, 4, 4,
    16, 				8, 4,	4,			  8, 4, 4,				2, 2, 4, 2, 2, 			4, 2, 2, 2, 4, 		    8, 4, 4,
    8, 8,				2, 2, 8, 2, 2, 		  4, 2, 2, 2, 4, 		8, 4, 
};

void delay_X_ms(unsigned int ms){
	while(ms--) delay_ms(1);
}


#endif